/**
 * @description 默认的全局中间件
 */

export default defineNuxtRouteMiddleware((to, from) => {
	console.log('我要去的页面:' + to.path)
	console.log('从哪个页面来:' + from.path)
	if (to.path === '/demo1') {
		console.log('禁止访问这个页面')
		abortNavigation()
		return navigateTo('/index')
	}
})
